<?php
$this->headTitle('Mail');
$this->placeholder('content_title')->set('');
//$this->placeholder('body_onload')->set('document.emailform.email_to.focus();');
?>

<h4>folder</h4>

<br />

<div>
    <?php
    echo '<b>local folder :</b><br />' . $this->mailFolders->getLocalName() . '<br /><br />';
    echo '<b>global folder :</b><br />' . $this->mailFolders->getGlobalName() . '<br /><br />';
    //echo '<b>selected folder :</b><br />' . $this->mailFolders-> . '<br /><br />';
    foreach ($this->mailFolders as $folder) {
        echo $folder . '<br />';
    }
    ?>
</div>

<br />

<div>

    <?php
    if (isset($this->mail) and $this->mail instanceof Zend_Mail_Message) {

        echo '<b>mail from :</b><br />' . $this->mail->from . '<br /><br />';
        echo '<b>mail received :</b><br />' . nl2br($this->mail->received) . '<br /><br />';
        echo '<b>mail subject :</b><br />' . nl2br($this->mail->subject) . '<br /><br />';
        echo '<b>mail contentType :</b><br />' . $this->mail->contentType . '<br /><br />';

        $flags = $this->mail->getFlags();
        if (false == empty($flags)) {
            echo 'mail flags :<br />' . var_dump($flags) . '<br /><br />';
        }

        echo '<b>mail content :</b><br />' . $this->mail->getContent() . '<br /><br />';
    }
    ?>

</div>